//WMPPlusHook.h
#include "WMPPlugin.h"
#include "WMPMenu.h"

#pragma once

enum IMPORT_LIBRARY: int {
	IMPORT_LIBRARY_KERNEL32 = 0x1,
	IMPORT_LIBRARY_USER32 = 0x2,
	IMPORT_LIBRARY_MSVCRT = 0x8,
	IMPORT_LIBRARY_API_LIBRARYLOADER = 0x40,
	IMPORT_LIBRARY_OLE32 = 0x80,
	IMPORT_LIBRARY_MF = 0x100,
};

[uuid("69734B0D-FF33-4C49-AC7F-ADFA440A3463")]
__interface IWMPPlusHook: IUnknown {
	HRESULT _stdcall Initialize3(HMODULE module, HMODULE instance, int majorVersion, int minorVersion, IMPORT_LIBRARY lib);
	HRESULT _stdcall Uninitialize();

	HRESULT _stdcall CreatePlugin(REFCLSID clsid, WMPPlugin *plugin, IWMPPluginUI* intf);
	HRESULT _stdcall SetupPlugin(REFCLSID clsid, BOOL shutdown);
	HRESULT _stdcall PlaceSubMenu(WMPSubMenu* menu, HMENU hMenu, [retval] int &position);
	HRESULT _stdcall InvokeSubMenu(WMPSubMenu* menu, HMENU hMenu);
	HRESULT _stdcall InvokeMenuItem(WMPMenuItem* item, HWND hWnd);
};

void WINAPI WMPInitialize2(HMODULE module, int majorVersion, int minorVersion, IMPORT_LIBRARY lib);
void WINAPI WMPFinalization();

extern IWMPPlusHook* Host;
